package com.ssy.lingxi.logistics.repository;

import com.ssy.lingxi.logistics.entity.LogisticsOrder;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 物流单实体仓库
 * @author yzc
 * @version 2.0.0
 * @date 2020/7/21
 */
public interface LogisticsOrderRepository extends JpaRepository<LogisticsOrder, Long> , JpaSpecificationExecutor<LogisticsOrder> {

    LogisticsOrder findByIdAndMemberIdAndRoleId(Long id, Long memberId, Long roleId);

    int countByCompanyIdAndStatusIn(Long id, List<Integer> orderStatus);

    boolean existsByCompanyId(Long companyId);
}